import random


my_score = 0
robot_score = 0;
count = 0
while count<5:

    robot = random.choice(['石头','剪刀','布'])

    player =input('输入0 石头 1 剪刀 2 布')


    if (player=='石头' and robot=="剪刀") or  (player=='剪刀' and robot=="布") or  (player=='布' and robot=="石头"):
        print('胜')
        my_score+=1
    elif ( player==robot):#索引同
        print("平")
    else:#输
        robot_score+=1
        print('败')
    count+=1


if my_score>robot_score:
    print("本局获胜,比分是{}:{}".format(my_score,robot_score))
else:
    print("本局失败,比分是{}:{}".format(my_score, robot_score))